/* 
 * This code is part of the smartlink project, see
 * 
 * 		http://code.google.com/p/smartlink/.
 * 
 * Copyright (C) 2008 Oliver Noelle
 * 
 * SmartLink is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * SmartLink is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with SmartLink.  If not, see <http://www.gnu.org/licenses/>.
 **/
package org.smartlink.provider;

import android.net.Uri;
import android.provider.BaseColumns;

/**
 * Convenience definitions for SmartLinkProvider
 */
public final class SmartLink {
	/**
	 * Links table
	 */
	public static final class Links implements BaseColumns {
		/** uri as a string */
		public static final String CONTENT_URI_STRING = "content://org.smartlink.provider.SmartLink/links";

		/**
		 * The content:// style URL for this table
		 */
		public static final Uri CONTENT_URI = Uri.parse(CONTENT_URI_STRING);

		/**
		 * The default sort order for this table
		 */
		public static final String DEFAULT_SORT_ORDER = "modified DESC";

		/**
		 * The key of the link
		 * <P>
		 * Type: TEXT
		 * </P>
		 */
		public static final String KEY = "key";

		/**
		 * The target of the link
		 * <P>
		 * Type: TEXT
		 * </P>
		 */
		public static final String TARGET = "target";

		/**
		 * The description for the target
		 * <P>
		 * Type: TEXT
		 * </P>
		 */
		public static final String DESCRIPTION = "description";

		/**
		 * The timestamp for when the link was created
		 * <P>
		 * Type: INTEGER (long)
		 * </P>
		 */
		public static final String CREATED_DATE = "created";

		/**
		 * The timestamp for when the link was last modified
		 * <P>
		 * Type: INTEGER (long)
		 * </P>
		 */
		public static final String MODIFIED_DATE = "modified";

		public static final String EXTRA_CREATE_LINK = "org.smartlink.CreateLink";

	}

	/** request code for editing a link */
	// public static final int EDIT_LINK_REQUEST_CODE = 1;
	/** request code for using a target item's data in the client app */
	public static final int USE_TARGET_REQUEST_CODE = 2;

	/** request code for following a target */
	public static final int FOLLOW_TARGET_REQUEST_CODE = 3;

	/** request code for editing a link */
	public static final int EDIT_LINK_KEY_REQUEST_CODE = 4;

	/** request code for picking a target for a link */
	public static final int PICK_TARGET_REQUEST_CODE = 5;

	/** request code for creating a new link */
	public static final int CREATE_LINK_REQUEST_CODE = 6;

	// TODO: naming
	public static final int PICK_TARGET_FOR_NEW_LINK_REQUEST_CODE = 7;

	/** Action to pick an item from within a list and return its uri as a result. */
	public static final String SMARTLINK_PICK_TARGET_ACTION = "org.smartlink.action.PICK_TARGET_ACTION";

	// TODO: naming
	/** Action to pick an item from within a list and return its uri as a result. */
	public static final String SMARTLINK_PICK_TARGET_ACTION2 = "org.smartlink.action.PICK_TARGET_ACTION_ACTIVITY";

	/** Action to use an item in a client app */
	public static final String SMARTLINK_USE_TARGET_ACTION = "org.smartlink.action.USE_TARGET_ACTION";

}
